package com.base.myproject.client.busi;



import com.base.myproject.client.CRM.ContactMaterial;
import com.base.myproject.client.HR.Books.B_r_books;
import com.base.myproject.client.HR.Books.GradeKeyword;
import com.base.myproject.client.HR.Books.SearchBook;
import com.base.myproject.client.HR.Books.Set_books;
import com.base.myproject.client.HR.Books.TradeStatute;
import com.base.myproject.client.HR.Salary.AddExtSalary;
import com.base.myproject.client.HR.Salary.FixedExtPloy;
import com.base.myproject.client.HR.Salary.Hr_helper;
import com.base.myproject.client.HR.Salary.Hr_hostel_amount;
import com.base.myproject.client.HR.Salary.Hr_reimbursement;
import com.base.myproject.client.HR.Salary.MakeSalary;
import com.base.myproject.client.HR.Salary.MakeSalaryX;
import com.base.myproject.client.HR.Salary.Rpt_SalaryContrast;
import com.base.myproject.client.HR.Salary.Salary;
import com.base.myproject.client.HR.Salary.Salary_Bonus;
import com.base.myproject.client.HR.Salary.Salary_Bonus_ploy;
import com.base.myproject.client.HR.Salary.Salary_Ploy;
import com.base.myproject.client.HR.Salary.Year_Holiday_Ploy;
import com.base.myproject.client.HR.Self.SelfBcodeMain;
import com.base.myproject.client.HR.Self.SelfPanel;
import com.base.myproject.client.HR.Training.Training_DepOrientationCheck;
import com.base.myproject.client.HR.Training.Training_HotelOrientation;
import com.base.myproject.client.HR.Training.Training_Manual;
import com.base.myproject.client.HR.Training.Training_MonthlyCalendar;
import com.base.myproject.client.HR.Training.Training_Record;
import com.base.myproject.client.HR.Training.Training_Result;
import com.base.myproject.client.HR.Training.Training_Task;
import com.base.myproject.client.HR.Training.Training_Task_list;
import com.base.myproject.client.HR.Training.Training_TypeSetting;
import com.base.myproject.client.HR.Training.Training_YearlyTrainingPlan;
import com.base.myproject.client.HR.account.setAccount;
import com.base.myproject.client.HR.attendance.AttTypeSet;
import com.base.myproject.client.HR.attendance.Att_Rep_Details;
import com.base.myproject.client.HR.attendance.Att_Rep_Exception;
import com.base.myproject.client.HR.attendance.Att_Rep_Statistics;
import com.base.myproject.client.HR.attendance.Att_Sealed;
import com.base.myproject.client.HR.attendance.Att_Work_And_Rest_Forrenshibu;
import com.base.myproject.client.HR.attendance.Att_records_check;
import com.base.myproject.client.HR.attendance.AttendanceEatTime;
import com.base.myproject.client.HR.attendance.Codex;
import com.base.myproject.client.HR.attendance.FixedHolidaysPloy;
import com.base.myproject.client.HR.attendance.Hr_Work_And_Rest;
import com.base.myproject.client.HR.attendance.RptAttendanceException;
import com.base.myproject.client.HR.attendance.Scheduling;
import com.base.myproject.client.HR.attendance.SelectEmployeesEat;
import com.base.myproject.client.HR.attendance.SelectWorkAndRest;
import com.base.myproject.client.HR.batchpro.BatchPro;
import com.base.myproject.client.HR.bcode.BcodeMain;
import com.base.myproject.client.HR.bcode.Bcode_Seach;
import com.base.myproject.client.HR.bcode.Bcode_pro;
import com.base.myproject.client.HR.bcode.HR_Wardrode;
import com.base.myproject.client.HR.bcode.HR_hostel;
import com.base.myproject.client.HR.bcode.RptDepLevel;
import com.base.myproject.client.HR.bcode.RptHostel;
import com.base.myproject.client.HR.bcode.Rpt_BureauTotal;
import com.base.myproject.client.HR.bcode.Rpt_HotelTotal;
import com.base.myproject.client.HR.bcode.Rpt_LeavingTotal;
import com.base.myproject.client.HR.bcode.Rpt_PersonnelStatements;
import com.base.myproject.client.HR.bcode.Rpt_WeekManpower;
import com.base.myproject.client.HR.bcode.Rpt_YearTurnover;
import com.base.myproject.client.HR.bcode.SearchCard;
import com.base.myproject.client.HR.bcode.SearchContract;
import com.base.myproject.client.HR.bcode.SearchHealth;
import com.base.myproject.client.HR.bcode.SearchZhiLi;
import com.base.myproject.client.HR.bcode.WardrodeList;
import com.base.myproject.client.HR.gcode.GetGoods;
import com.base.myproject.client.HR.gcode.Hr_goods;
import com.base.myproject.client.HR.gcode.Hr_goods_process;
import com.base.myproject.client.HR.gcode.QueryGoodsBcode;
import com.base.myproject.client.HR.holiday.AskForLeave;
import com.base.myproject.client.HR.holiday.ProlongYearVacationRequest;
import com.base.myproject.client.HR.holiday.VacationManagementPloy;
import com.base.myproject.client.HR.holiday.VacationManagerPayment;
import com.base.myproject.client.HR.holiday.VacationReport;
import com.base.myproject.client.HR.holiday.YearVacationManager;
import com.base.myproject.client.HR.recruitment.PositionRequest;
import com.base.myproject.client.HR.recruitment.PositionRequestSearch;
import com.base.myproject.client.HR.recruitment.RecruitmentAudit;
import com.base.myproject.client.HR.recruitment.RecruitmentRequest;
import com.base.myproject.client.HR.recruitment.ResumeLibrary;
import com.base.myproject.client.HR.recruitment.Retest;
import com.base.myproject.client.HR.setting.HR_dictionary_Setting;
import com.base.myproject.client.HR.setting.HR_holidayType_Setting;
import com.base.myproject.client.HR.setting.HR_hourPay_Setting;
import com.base.myproject.client.HR.setting.HR_title_Setting;
import com.base.myproject.client.HR.setting.HR_weekEnd_Setting;
import com.base.myproject.client.HR.setting.HrTaxSeting;
import com.base.myproject.client.HR.setting.Option;
import com.base.myproject.client.HR.setting.Salary_Item;
import com.base.myproject.client.HR.setting.SetRemind;
import com.base.myproject.client.HR.setting.Social_S;
import com.base.myproject.client.HR.setting.Social_base;
import com.base.myproject.client.HR.setting.WorkBatchSet;
import com.base.myproject.client.busi.business.RatifyList;
import com.base.myproject.client.busi.print.BusiPrinter;
import com.base.myproject.client.busi.service.FirstStart;
import com.base.myproject.client.busi.service.Systempanel;
import com.base.myproject.client.busi.system.Bcodeself;
import com.base.myproject.client.busi.system.Business;
import com.base.myproject.client.busi.system.BusinessPermissions;
import com.base.myproject.client.busi.system.GroupMenber;
import com.base.myproject.client.busi.system.MenuPermissionsX;
import com.base.myproject.client.development.Question;
import com.base.myproject.client.system.AboutUs;
import com.base.myproject.client.system.Logout;
import com.base.myproject.client.system.MenuManager;
import com.base.myproject.client.tools.FileDialog;
import com.base.myproject.client.ui.BaseJDBCPanel;
import com.base.myproject.client.ui.BaseOpenJSP;
import com.base.myproject.client.ui.BaseTabPanel;
import com.extjs.gxt.ui.client.event.ComponentEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.google.gwt.core.client.GWT;

public class MenuCommandFactory extends SelectionListener{
	String command = null;
	String dispalyname=null;
	public MenuCommandFactory(String command)
	{
		this.command = command;
		
	}
	public /*static */BaseJDBCPanel getCommand( String command)
	{
		GWT.log(command, null);
		
//begin =================="系统配置"所有菜单放在此  2010-9-22 by william======================//		
		if(command.equals("changepass"))
		{
			new Bcodeself("").showDialog();
		}

		else if(command.equals("systemgroup"))
		{
			GroupMenber groupmenber =new GroupMenber();
			groupmenber.complete();
			BaseTabPanel.getInstance().addTab("组定义", groupmenber);
		}

		else if(command.equals("Systempanel"))
		{
			
			Systempanel w =new Systempanel();
			w.complete();
			BaseTabPanel.getInstance().addTab("公司信息", w);
		}
		else if(command.equals("menuinput")) //菜单定义
		{
			
			MenuManager tb3 = new MenuManager();
			  tb3.complete();
			  BaseTabPanel.getInstance().addTab("菜单定义",tb3);
		}
		else if(command.equals("MenuPermissionsX")) //菜单权限
		{
			MenuPermissionsX menupermissions =new MenuPermissionsX();
			menupermissions.complete();
			BaseTabPanel.getInstance().addTab("菜单权限", menupermissions);
			menupermissions.initToolBar();
		}
		else if(command.equals("SearchZhiLi")) //菜单权限
		{
			SearchZhiLi menupermissions =new SearchZhiLi();
			menupermissions.complete();
			BaseTabPanel.getInstance().addTab("雇员资历查询", menupermissions);
			menupermissions.initToolBar();
		}
		else if(command.equals("BusinessPermissions"))
		{
		
			
			BusinessPermissions w = new BusinessPermissions();
			w.complete();
			BaseTabPanel.getInstance().addTab("业务权限", w);
		}
		
		else if(command.equals("reimbursement"))
		{
		
			
			Hr_reimbursement w = new Hr_reimbursement();
			w.complete();
			BaseTabPanel.getInstance().addTab("内部报销", w);
		}
		
		else if(command.equals("Business"))
		{
		
			
			Business w = new Business();
			w.complete();
			BaseTabPanel.getInstance().addTab("业务定义", w);
		}
		
		else if(command.equals("BusiPrinter"))
		{
		
			
			BusiPrinter w = new BusiPrinter();
			w.complete();
			BaseTabPanel.getInstance().addTab("打印格式设置", w);
		}
		else if(command.equals("gradeKeyword"))
		{
		
			
			GradeKeyword keyword = new GradeKeyword();
			keyword.complete();
			BaseTabPanel.getInstance().addTab("级别关键字", keyword);
		}
		
		else if(command.equals("WorkBatchSet"))
		{
			WorkBatchSet w = new WorkBatchSet();
			w.complete();
			BaseTabPanel.getInstance().addTab("班次设定", w);
		}
		
		
		else if(command.equals("RatifyList"))
		{
		
			
			RatifyList w = new RatifyList();
			w.complete();
			BaseTabPanel.getInstance().addTab("审批任务", w);
		}
		else if(command.equals("WardrodeList")) //关于
		{
			WardrodeList w = new WardrodeList();
			w.complete();
			BaseTabPanel.getInstance().addTab("衣柜列表查询", w);
		}
		
		else if(command.equals("wardrodeList")) //关于
		{
			AboutUs a = new AboutUs();
			a.getAbout().show();
		}
		
		else if(command.equals("exit")) //退出
		{
			Logout logout = new Logout();
			logout.logout();
		
		}
//end =================="系统配置"所有菜单  2010-9-22 by william======================//
		
		
		
//begin =================="人力资源系统"所有菜单放在此  2010-9-22 by william======================//
		else if(command.equals("Salary"))
		{
		
			
			Salary w = new Salary();
			w.complete();
			BaseTabPanel.getInstance().addTab("薪金列表", w);
		}
		else if(command.equals("MakeSalary"))
		{
		
			
			MakeSalary w = new MakeSalary();
			w.complete();
			BaseTabPanel.getInstance().addTab("发放薪金", w);
		}
		else if(command.equals("MakeSalaryX"))
		{
		
			
			MakeSalaryX w = new MakeSalaryX();
			w.complete();
			BaseTabPanel.getInstance().addTab("产生薪金", w);
		}
		else if(command.equals("FixedExtPloy"))
		{
			FixedExtPloy w = new FixedExtPloy();
			w.complete();
			BaseTabPanel.getInstance().addTab("固定津贴", w);
		}
		else if(command.equals("Rpt_SalaryContrast"))
		{
			Rpt_SalaryContrast w = new Rpt_SalaryContrast();
			w.complete();
			BaseTabPanel.getInstance().addTab("发薪记录对比", w);
		}
		else if(command.equals("Salary_Ploy"))
		{
		
			
			Salary_Ploy w = new Salary_Ploy();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"物品申请":dispalyname, w);
		}
		
		else if(command.equals("AddExtSalary"))
		{
			AddExtSalary w = new AddExtSalary();
			BaseTabPanel.getInstance().addTab("津贴", w);
		}
		else if(command.equals("BcodeMain"))
		{
		
			
			
			BcodeMain w = new BcodeMain();
			w.complete();
			BaseTabPanel.getInstance().addTab("雇员资料管理", w);
		}
		else if(command.equals("HR_Wardrode"))
		{
		
			
			HR_Wardrode w = new HR_Wardrode();
			w.complete();
			BaseTabPanel.getInstance().addTab("雇员衣柜管理", w);
		}
		else if(command.equals("HR_hostel"))
		{
		
			
			HR_hostel w = new HR_hostel();
			w.complete();
			BaseTabPanel.getInstance().addTab("雇员宿舍管理", w);
		}
		else if(command.equals("RptHostel"))
		{
		
			
			RptHostel w = new RptHostel();
			w.complete();
			BaseTabPanel.getInstance().addTab("宿舍列表查询", w);
		}
		else if(command.equals("Hr_goods"))
		{
		
			
			Hr_goods w = new Hr_goods();
			w.complete();
			BaseTabPanel.getInstance().addTab("雇员物品管理", w);
		}
		
		else if(command.equals("Rpt_WeekManpower"))
		{
			Rpt_WeekManpower w = new Rpt_WeekManpower();
			w.complete();
			BaseTabPanel.getInstance().addTab("每周人力统计", w);
		}
		
		else if(command.equals("Rpt_HotelTotal"))
		{
			Rpt_HotelTotal w = new 	Rpt_HotelTotal();
			w.complete();
			BaseTabPanel.getInstance().addTab("宿舍情况统计", w);
		}
		
		else if(command.equals("Rpt_BureauTotal"))
		{
			Rpt_BureauTotal w = new Rpt_BureauTotal();
			w.complete();
			BaseTabPanel.getInstance().addTab("雇员衣柜统计", w);
		}
		
		else if(command.equals("Rpt_LeavingTotal"))
		{
			Rpt_LeavingTotal w = new Rpt_LeavingTotal();
			w.complete();
			BaseTabPanel.getInstance().addTab("年度累计离职报表", w);
		}
		
		else if(command.equals("RPTSalary"))
		{
			Rpt_LeavingTotal w = new Rpt_LeavingTotal("hr_Jsp/rptSalary.jsp");
			w.complete();
			BaseTabPanel.getInstance().addTab("工资月度报表", w);
		}
		
		else if(command.equals("Rpt_MonthLeaving"))
		{
			Rpt_LeavingTotal w = new Rpt_LeavingTotal("hr_Jsp/rptMonthLeaving.jsp");
			w.complete();
			BaseTabPanel.getInstance().addTab("月度离职报表", w);
		}
		
		else if(command.equals("Rpt_MonthTurnover"))
		{
			Rpt_LeavingTotal w = new Rpt_LeavingTotal("hr_Jsp/rptMonthTurnover.jsp");
			w.complete();
			BaseTabPanel.getInstance().addTab("月度人员流失统计", w);
		}
		
		else if(command.equals("Rpt_PersonnelStatements"))
		{
			Rpt_PersonnelStatements w = new Rpt_PersonnelStatements();
			w.complete();
			BaseTabPanel.getInstance().addTab("人事资源报表", w);
		}
		
		else if(command.equals("Rpt_YearTurnover"))
		{
			Rpt_YearTurnover w = new Rpt_YearTurnover();
			w.complete();
			BaseTabPanel.getInstance().addTab("年度人员流失率统计", w);
		}
		
		else if(command.equals("FixedHolidaysPloy"))
		{
			FixedHolidaysPloy w = new FixedHolidaysPloy();
			w.complete();
			BaseTabPanel.getInstance().addTab("固定假期设置", w);
		}
		
		else if(command.equals("RptDepLevel"))
		{
			RptDepLevel w = new RptDepLevel();
			w.complete();
			BaseTabPanel.getInstance().addTab("部门雇佣级别分析", w);
		}
		
		else if(command.equals("GetGoods"))
		{
		
			
			GetGoods w = new GetGoods();
			w.complete();
			//BaseTabPanel.getInstance().addTab("物品申请", w);
			BaseTabPanel.getInstance().addTab(dispalyname==null?"物品申请":dispalyname, w);
		}
		
		else if(command.equals("HrTaxSeting"))
		{
		
			
			HrTaxSeting w = new HrTaxSeting();
			w.complete();
			BaseTabPanel.getInstance().addTab("税务设置", w);
		}
		else if(command.equals("Salary_Item"))
		{
		
			
			Salary_Item w = new Salary_Item();
			w.complete();
			BaseTabPanel.getInstance().addTab("薪金项目设置", w);
		}
		else if(command.equals("Salary_Bonus"))
		{
		
			
			Salary_Bonus w = new Salary_Bonus();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"花红":dispalyname, w);
		}
		
		else if(command.equals("Salary_Bonus_ploy"))
		{
		
			
			Salary_Bonus_ploy w = new Salary_Bonus_ploy();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"花红":dispalyname, w);
		}
		
		else if(command.equals("Social_base"))
		{
		
			
			Social_base w = new Social_base();
			w.complete();
			BaseTabPanel.getInstance().addTab("社保基数设置", w);
		}
		else if(command.equals("Social_S"))
		{
		
			
			Social_S w = new Social_S();
			w.complete();
			BaseTabPanel.getInstance().addTab("社保策略", w);
		}
		else if(command.equals("Year_Holiday_Ploy"))
		{
		
			
			Year_Holiday_Ploy w = new Year_Holiday_Ploy();
			w.complete();
			BaseTabPanel.getInstance().addTab("年假策略", w);
		}
		else if(command.equals("AskForLeave"))
		{
		
			
			AskForLeave w = new AskForLeave();
			w.complete();
			BaseTabPanel.getInstance().addTab("请假单", w);
		}
		else if(command.equals("Hr_helper"))
		{
			Hr_helper w = new Hr_helper();
			w.complete();
			BaseTabPanel.getInstance().addTab("帮工工资", w);
		}
		else if(command.equals("Hr_goods_process"))
		{
		
			
			Hr_goods_process w = new Hr_goods_process();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"物品处理":dispalyname, w);
		}
		else if(command.equals("QueryGoodsBcode"))
		{
			QueryGoodsBcode w = new QueryGoodsBcode();
			//w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"物品查询":dispalyname, w);
		}
		
		
		
		else if(command.equals("HR_a_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_a'", "hr_a");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("InformationFrom"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='informationFrom'", "informationFrom");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_addrtype_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_addrtype'", "hr_addrtype");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_bank_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_bank'", "hr_bank");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_c_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_c'", "hr_c");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_Country_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_Country'", "hr_Country");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_Education_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_education'", "hr_education");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_jobgroup_setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_jobgroup'", "hr_jobgroup");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_jobproperty_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_jobproperty'", "hr_jobproperty");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_jobtype_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_jobtype'", "hr_jobtype");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_p_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_p'", "hr_p");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_book_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='book'", "book", false);
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_book_type_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_bookstyle'", "hr_bookstyle");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_paymethod_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_paymethod'", "hr_paymethod");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_relationship_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_relationship'", "hr_relationship");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_title_Setting"))
		{
			HR_title_Setting w = new HR_title_Setting();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_interview_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='interview'", "interview");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_reason_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='reason'", "reason");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_zy_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='zy'", "zy");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_exception_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='exception'", "exception");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		
		else if(command.equals("HR_zyzk_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='zyzk'", "zyzk");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_e_level_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_e_level'", "hr_e_level");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_HotelSection")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_hotelsection'", "hr_hotelsection", false);
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_TrainingType_Setting")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_trainingtype'", "hr_trainingtype");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_Attendance_Exception_Setting")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_attException'", "hr_attException");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("SelfPanel"))
		{
			SelfPanel w = new SelfPanel();
//			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("SelfBcodeMain"))
		{
			SelfBcodeMain w = new SelfBcodeMain();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_EmployeeChange_Remark")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='employeechange'", "employeechange");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		else if(command.equals("HR_LeaveReason")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_leavereason'", "hr_leavereason");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		} 
		else if(command.equals("Hr_Personal_LeaveReason")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_personal_leavereason'", "hr_personal_leavereason");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		} 
		else if(command.equals("HR_StudentFrom")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='HR_StudentFrom'", "HR_StudentFrom");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		} 
		else if(command.equals("HR_BookStyle")){
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='hr_bookstyle'", "HR_BookStyle");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		} 
		
		else if(command.equals("Option")){
			Option option = new Option();
			option.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname,option);
		}
		//--------------------------HR end
		//调用jsp
		else if(command.startsWith("BaseOpenJSP"))
		{
		
			if(command.indexOf("?")>0)
			{
				int index = command.indexOf("?");
				
			String jsp = command.substring(index+1);
			
			BaseOpenJSP w = new BaseOpenJSP(jsp);
			w.complete();
			
			BaseTabPanel.getInstance().addTab(dispalyname==null?"---":dispalyname, w);
			}
		}
		
		else if(command.equals("firststart"))
		{
		
			
			FirstStart w = new FirstStart();
			
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("Scheduling"))
		{
			Scheduling w = new Scheduling();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("Codex"))
		{
			Codex w = new Codex();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);

		}else if(command.equals("Hr_Work_And_Rest"))
		{
			Hr_Work_And_Rest w = new Hr_Work_And_Rest();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
	    else if(command.equals("Att_Rep_Details"))
		{
			Att_Rep_Details w = new Att_Rep_Details();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("Att_records_check"))
		{
			Att_records_check w = new Att_records_check();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Att_Rep_Statistics"))
		{
			Att_Rep_Statistics w = new Att_Rep_Statistics();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Att_Sealed"))
		{
			Att_Sealed w = new Att_Sealed();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Att_Rep_Exception")){
			Att_Rep_Exception w = new Att_Rep_Exception();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("SelectWorkAndRest")) //补休/加班查询
		{
			
			SelectWorkAndRest tb3 = new SelectWorkAndRest();
			  tb3.complete();
			  BaseTabPanel.getInstance().addTab("补休/加班查询",tb3);
		}
		else if(command.equals("RptAttendanceException")){
			RptAttendanceException w = new RptAttendanceException();
			w.complete();
			BaseTabPanel.getInstance().addTab("考勤异常报表", w);
		}
		else if(command.equals("AttTypeSet")) //考勤机类型设置
		{
			
			AttTypeSet tb3 = new AttTypeSet();
			  tb3.complete();
			  BaseTabPanel.getInstance().addTab("考勤机类型设置",tb3);
		}
		else if(command.equals("AttendanceEatTime")) //用餐时段设置
		{
			
			AttendanceEatTime tb3 = new AttendanceEatTime();
			  tb3.complete();
			  BaseTabPanel.getInstance().addTab("用餐时段设置",tb3);
		}
		else if(command.equals("SelectEmployeesEat")) //用餐查询
		{
			
			SelectEmployeesEat tb3 = new SelectEmployeesEat();
			  tb3.complete();
			  BaseTabPanel.getInstance().addTab("员工用餐统计",tb3);
		}
		else if(command.equals("Att_Work_And_Rest_Forrenshibu")) //用餐查询
		{
			
			Att_Work_And_Rest_Forrenshibu tb3 = new Att_Work_And_Rest_Forrenshibu();
			tb3.complete();
			BaseTabPanel.getInstance().addTab("调整 加班/补休",tb3);
		}
		else if(command.equals("Set_books"))
		{
			Set_books w = new Set_books();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
//招聘所有的页面放这里
		else if(command.equals("RecruitmentRequest"))
		{
			RecruitmentRequest w = new RecruitmentRequest();
			w.complete();
			BaseTabPanel.getInstance().addTab("填写人力申请表", w);
		}
		else if(command.equals("RecruitmentAudit"))
		{
			RecruitmentAudit w = new RecruitmentAudit();
			w.complete();
			BaseTabPanel.getInstance().addTab("操作人力申请表", w);
		}
		else if(command.equals("Retest"))
		{
			Retest w = new Retest();
			w.complete();
			BaseTabPanel.getInstance().addTab("操作面试结果", w);
		}
		else if(command.equals("RecruitmentAudit1"))
		{
			String sql = "select * from hr_recruitmentRequest where isThrough = 'true' and hirePeople is null order by requestDate asc";
			RecruitmentAudit audit = new RecruitmentAudit(
					sql);
			audit.complete();
			BaseTabPanel
					.getInstance()
					.addTab("职位申请", audit);
		}
		else if(command.equals("ResumeLibrary"))
		{
			ResumeLibrary w = new ResumeLibrary();
			w.complete();
			BaseTabPanel.getInstance().addTab("简历库", w);
		}
		else if(command.equals("PositionRequest"))
		{
			PositionRequest w = new PositionRequest();
			w.complete();
			BaseTabPanel.getInstance().addTab("快速申请职位", w);
		}
		else if(command.equals("PositionRequestSearch"))
		{
			PositionRequestSearch w = new PositionRequestSearch();
			w.complete();
			BaseTabPanel.getInstance().addTab("安排面试", w);
		}
		
//招聘页面结束
		else if(command.equals("B_r_books"))
		{
			B_r_books w = new B_r_books();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Training_DepOrientationCheck")){  //部门入职培训检查
			Training_DepOrientationCheck w = new Training_DepOrientationCheck();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Training_HotelOrientation")){//酒店入职培训
			Training_HotelOrientation w = new Training_HotelOrientation();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Training_YearlyTrainingPlan")){//年度培训计划
			Training_YearlyTrainingPlan w = new Training_YearlyTrainingPlan();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("Training_MonthlyCalendar")){//部门培训月历
			Training_MonthlyCalendar w = new Training_MonthlyCalendar();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Training_TypeSetting")){//培训类型定义
			Training_TypeSetting w = new Training_TypeSetting();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Training_Manual")){//培训记录
			Training_Manual w = new Training_Manual();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Training_Record")){//培训记录
			Training_Record w = new Training_Record();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("setAccount"))
		{
			setAccount w = new setAccount();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);

		}else if(command.equals("Bcode_Seach"))
		{
			Bcode_Seach w = new Bcode_Seach();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("BatchPro"))//批处理
		{
			BatchPro w = new BatchPro();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("TradeStatute"))//文档上传
		{
			TradeStatute w = new TradeStatute();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("HR_hourPay_Setting"))
		{
			HR_hourPay_Setting w = new HR_hourPay_Setting();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Bcode_pro"))
		{
			Bcode_pro w = new Bcode_pro();
			//w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
		else if(command.equals("Training_Task"))
		{
			Training_Task w = new Training_Task();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("Training_Task_list"))
		{
			Training_Task_list w = new Training_Task_list();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("Hr_hostel_amount"))
		{
			Hr_hostel_amount w = new Hr_hostel_amount();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}	else if(command.equals("Training_Result"))
		{
			Training_Result w = new Training_Result();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}else if(command.equals("Training_Manual")){//培训记录
			Training_Manual w = new Training_Manual();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"首次使用设定":dispalyname, w);
		}
//end =================="人力资源系统"所有菜  2010-9-22 by william======================//	
		else if(command.equals("Question"))
		{
			Question w = new Question();
			w.complete();
			BaseTabPanel.getInstance().addTab("开发问题", w);
		}
		else if(command.equals("SetRemind")) //用餐时段设置
		{
			
			SetRemind tb3 = new SetRemind();
			  tb3.complete();
			  BaseTabPanel.getInstance().addTab("自定义工作台的信息",tb3);
		}
		else if(command.equals("InsertExcel")) //导入excel
		{
			
			Dialog d = FileDialog.getExcelFileDialog();
			d.show();
		}
		else if(command.equals("SearchContract"))
		{
			SearchContract w = new SearchContract(getDispalyname());
			w.complete();
			BaseTabPanel.getInstance().addTab("过/到期合同查询", w);
		}
		else if(command.equals("BeyondDeadline"))
		{
			B_r_books w = new B_r_books(getDispalyname());
			w.complete();
			BaseTabPanel.getInstance().addTab("借书逾期查询", w);
		}
		else if(command.equals("SearchHealth"))
		{
			SearchHealth w = new SearchHealth(getDispalyname());
			w.complete();
			BaseTabPanel.getInstance().addTab("过期健康证查询", w);
		}
		else if(command.equals("SearchCard"))
		{
			SearchCard w = new SearchCard();
			w.complete();
			BaseTabPanel.getInstance().addTab("证件资料查询", w);
		}
		else if(command.equals("SearchAllContract"))
		{
			SearchContract w = new SearchContract();
			w.complete();
			BaseTabPanel.getInstance().addTab("合同资料查询", w);
		}
		else if(command.equals("SearchAllHealth"))
		{
			SearchHealth w = new SearchHealth();
			w.complete();
			BaseTabPanel.getInstance().addTab("健康证资料查询", w);
		}
		else if(command.equals("SearchBook"))
		{
			SearchBook w = new SearchBook();
			w.complete();
			BaseTabPanel.getInstance().addTab("图书资料查询", w);
		}
		
			
		else if(command.equals("ContactMaterial_Setting"))
		{
			HR_dictionary_Setting w = new HR_dictionary_Setting("select * from dictionary where type='cm_type'", "cm_type");
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		//CRM模块在这定义
		else if(command.equals("ContactMaterial"))
		{
			ContactMaterial w = new ContactMaterial();
			w.complete();
			BaseTabPanel.getInstance().addTab(dispalyname==null?"":dispalyname, w);
		}
		//假期管理
		else if(command.equals("VacationManagementPloy"))
		{
		
			
			VacationManagementPloy w = new VacationManagementPloy();
			w.complete();
			BaseTabPanel.getInstance().addTab("假期策略", w);
		}
		else if(command.equals("VacationManagerHold"))
		{
		
			
			VacationManagerPayment w = new VacationManagerPayment();
			w.complete();
			BaseTabPanel.getInstance().addTab("请假扣款", w);
		}
		else if(command.equals("YearVacationManager"))
		{
		
			
			YearVacationManager w = new YearVacationManager();
			w.complete();
			BaseTabPanel.getInstance().addTab("年假报表", w);
		}
		else if(command.equals("YearVacationManager"))
		{
		
			
			YearVacationManager w = new YearVacationManager();
			w.complete();
			BaseTabPanel.getInstance().addTab("年假查询", w);
		}
		else if(command.equals("ProlongYearVacationRequest"))
		{
		
			
			ProlongYearVacationRequest w = new ProlongYearVacationRequest();
			w.complete();
			BaseTabPanel.getInstance().addTab("延长年假", w);
		}
		else if(command.equals("VacationReport"))
		{
		
			
			VacationReport w = new VacationReport();
			w.complete();
			BaseTabPanel.getInstance().addTab("假期报表", w);
		}
		else if(command.equals("HR_holidayType_Setting"))
		{
		
			
			HR_holidayType_Setting w = new HR_holidayType_Setting();
			w.complete();
			BaseTabPanel.getInstance().addTab("假期类型定义", w);
		}
		else if(command.equals("HR_weekEnd_Setting"))
		{
		
			
			HR_weekEnd_Setting w = new HR_weekEnd_Setting();
			w.complete();
			BaseTabPanel.getInstance().addTab("例休定义", w);
		}
		
		return null;
	}
	
	@Override
	public void componentSelected(ComponentEvent ce) {
		// TODO Auto-generated method stub
	
		getCommand(command);
	}
	public String getCommand() {
		return command;
	}
	public void setCommand(String command) {
		this.command = command;
	}
	public String getDispalyname() {
		return dispalyname;
	}
	public void setDispalyname(String dispalyname) {
		this.dispalyname = dispalyname;
	}


}
